<?php

namespace app\admin\controller;

/**
* 
*/
class System extends Base
{
 	//网站信息
 	public function set(){
 		$webInfo=model('System')->find();
 		$viewData=[
 			'webInfo'=>$webInfo
 		];
 		$this->assign($viewData);
 		return view();
 	}
 	//网站信息修改
 	public function edit(){
 		if(request()->isAjax()){
 			$data=[
 			'id'=>input('post.id'),
 				'webname'=>input('post.webname'),
 				'copyright'=>input('post.copyright')
 			];
 			$result=model('System')->edit($data);
 			if($result==1){
 				$this->success('修改成功！','admin/system/set');
 			}else{
 				$this->error($result);
 			}
 		}
 	}

}






